[][src]Crate div

Re-exports

pub use div_handle::*;
pub use error::*;
pub use global::*;

Modules

div_handle

Defines operations allowed on DivHandles

error
global

Structs

JsClass
JsClassHandle
PendingScript

Functions

doc
from_js_class

Creates a new div and fills it with a JS class.

init

Mounts the div to the HTML body

init_div_rs
init_ex

Extended initialization function. Mounts a global div as a child of the HTML element with the defined ID. The specified dimensions restrict the area in which divs are visible.

init_ex_with_element

Extended initialization function. Mounts a global div as a child of the element provided. The specified dimensions restrict the area in which divs are visible.

init_to

Mounts the div to a element with the given id

load_js_class

Experimental: This API is experimental and my not be included in later versions Load a class named name from a JS file accessible at src.

load_js_classes

Experimental: This API is experimental and my not be included in later versions Attempts to load a JS module by its source path and loads the classes exported by it, as named by the classes parameter. Usage is equivalent to load_js_class.

load_js_module

Experimental: This API is experimental and my not be included in later versions Asynchronously loads a JS module by appending a script tag to the head with th e provided string as content. Poll the future until it resolves to know when the script has been loaded for sure. In contrast to the more conventional Future design, the JS module will be loaded even if the Future is not polled. The Future only checks if it has already finished.

new

Creates a new div at the defined position with the given HTML as content. Use the returned DivHandle to manipulate the div.

new_styled

Creates a new div at the defined position with the given HTML as content and with CSS classes and inline styles.